CREATE EXTERNAL TABLE jms_dwd.dwd_tmsnew_shipment_stop_dt(
ID                                bigint         comment  "经停点编码"
,SHIPMENT_ID                       bigint         comment  "任务ID"
,SHIPMENT_NO                       string         comment  "任务编号"
,SORT_NUM                          bigint         comment  "顺序编号"
,NETWORK_ID                        bigint         comment  "经停网点ID"
,NETWORK_CODE                      string         comment  "经停网点编号"
,NETWORK_NAME                      string         comment  "经停网点名称"
,ROADSECTION_ID                    bigint         comment  "路段编号"
,PLANNED_ARRIVAL_DAY               string         comment  "计划到达日期"
,PLANNED_ARRIVAL_HOUR              string         comment  "计划到达时间"
,PLANNED_ARRIVAL_TIME              timestamp      comment  "计划到达日期+时间"
,ACTUAL_ARRIVAL_TIME               timestamp      comment  "实际到达时间"
,PLANNED_DEPARTURE_DAY             string         comment  "计划离开日期"
,PLANNED_DEPARTURE_HOUR            string         comment  "计划离开时间"
,PLANNED_DEPARTURE_TIME            timestamp      comment  "计划离开日期+时间"
,ACTUAL_DEPARTURE_TIME             timestamp      comment  "实际离开时间"
,STOP_TIME                         bigint         comment  "经停时长"
,USETIME                           bigint         comment  "运输耗时(MIN)"
,MILEAGE                           double         comment  "规划里程(KM)"
,SPEED                             double         comment  "时速(KM/H)"
,BATCH_TIME                        string         comment  "批次时间"
,HANDLING_TYPE                     string         comment  "装卸类型"
,LOAD_START_TIME                   timestamp      comment  "开始装货"
,LOAD_END_TIME                     timestamp      comment  "装货完成"
,UNLOAD_START_TIME                 timestamp      comment  "开始卸货"
,UNLOAD_END_TIME                   timestamp      comment  "卸货完成"
,APP_ARRIVAL_TIME                  timestamp      comment  "APP到达时间"
,APP_DEPARTURE_TIME                timestamp      comment  "APP离开时间"
,GPS_ARRIVAL_TIME                  timestamp      comment  "GPS到达时间"
,GPS_DEPARTURE_TIME                timestamp      comment  "GPS离开时间"
,LOCK_TIME                         timestamp      comment  "锁车时间"
,UNLOCK_TIME                       timestamp      comment  "解锁时间"
,WEIGHT_ARRIVAL_TIME               timestamp      comment  "过磅进站时间"
,WEIGHT_DEPARTURE_TIME             timestamp      comment  "过磅出站时间"
,ARRIVAL_GROSS_WEIGHT              double         comment  "到达毛重"
,ARRIVAL_TARE_WEIGHT               double         comment  "到达皮重"
,ARRIVAL_NET_WEIGHT                double         comment  "到达净重"
,DEPARTURE_GROSS_WEIGHT            double         comment  "离开毛重"
,DEPARTURE_TARE_WEIGHT             double         comment  "离开皮重"
,DEPARTURE_NET_WEIGHT              double         comment  "离开净重"
,ESTIMATE_ARRIVAL_TIME             timestamp      comment  "预计到达时间=上一站实际发车时间+本站运输耗时(MIN)"
,PLAN_DRIVING_TIME                 bigint         comment  "规定行驶时间"
,ACTUAL_DRIVING_TIME               bigint         comment  "实际行驶时间"
,ACTUAL_ARRIVAL_TIME_SOURCE        string         comment  "实际进站时间来源"
,ACTUAL_DEPARTURE_TIME_SOURCE      string         comment  "实际出站时间来源"
,ESTIMATE_BATCH_TIME               timestamp      comment  "应赶批次"
,ACTUAL_BATCH_TIME                 timestamp      comment  "实赶批次时间"
,CREATE_BY                         bigint         comment  "创建人ID"
,CREATE_BY_NAME                    string         comment  "创建人姓名"
,CREATE_TIME                       timestamp      comment  "创建时间"
,UPDATE_BY                         bigint         comment  "更新人ID"
,UPDATE_BY_NAME                    string         comment  "更新人姓名"
,UPDATE_TIME                       timestamp      comment  "更新时间"
,SIMPLE_NAME                       string         comment  "网点简称"
,LATEST_ARRIVAL_TIME               timestamp      comment  "最晚到车日期+时间"
,LATEST_ARRIVAL_HOUR               string         comment  "最晚到车时间"
,LATEST_ARRIVAL_DAY                string         comment  "最晚到车日期"
,GPS_DEPART_MILEAGE                double         comment  "GPS发车里程"
,GPS_ARRIVAL_MILEAGE               double         comment  "GPS到车里程"
,IS_SEND                           tinyint        comment  "是否发送gps发车预警消息"
,FINANCIAL_CENTER_ID               bigint         comment  "代理区ID"
,FINANCIAL_CENTER_CODE             string         comment  "代理区CODE"
,FINANCIAL_CENTER_DESC             string         comment  "代理区名称"
,CLOCK_TIME                        timestamp      comment  "中心签到时间"
,TABLE_TYPE                        tinyint        comment  "类型；1,干线；2,支线"
 )
 COMMENT '干线支线经停点表'
 PARTITIONED BY (dt STRING COMMENT '更新/创建日期 (yyyy-MM-dd)')
 STORED AS PARQUET
 LOCATION '/dw/hive/jms_dwd.db/external/dwd_tmsnew_shipment_stop_dt'
 TBLPROPERTIES (
 'parquet.column.index.access'='true'
 );